﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DZPK
{
    public class Table
    {
        //public Player Me;
        //public List<Player> Others;
        //public List<Card> CardsOnTable;
        //public Player PlayerOnTurn;
        //public List<CardOption> OptionsAvailable;

        public Dictionary<int, Player> seatIDToPlayerMap;

        public int tableIndex;
        public string tableName;
        public Int64 maxSeatCount;
        public Int64 minBuyChips;
        public Int64 maxBuyChips;
        public string serverIP;
        public string serverPort;

        public Table()
        {
            maxSeatCount = 0;
            tableIndex = 0;
            seatIDToPlayerMap = new Dictionary<int, Player>();
        }

        public Table(int TableID, int MinBuyChips, int MaxBuyChips, string tablename, int MaxSeatCount)
        {
            this.tableIndex = TableID;
            this.minBuyChips = MinBuyChips;
            this.maxBuyChips = MaxBuyChips;
            this.tableName = tablename;
            this.maxSeatCount = MaxSeatCount;

            seatIDToPlayerMap = new Dictionary<int, Player>(MaxSeatCount);
        }

        public void AddPlayerToTable(int seatID, Player player)
        {
            if (seatIDToPlayerMap != null)
            {
                seatIDToPlayerMap[seatID] = player;
            }
        }

        public int GetFreeSeatID()
        {
            return 0;
        }
    }
}
